﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using ToolsLayer;
using Webcar.BLL;

namespace Webcar.UI
{
    public partial class gsViewPop : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.IsPostBack) return;
            string gsid = this.Request.QueryString["id"];
            string sql = "select * from v_send_msg where msg_xh='"+gsid+"'";
            DataSet ds = DB.ExecuteDataset(sql);
            foreach (DataRow row in ds.Tables[0].Rows)
            {
                this.lblSendMan.Text = row["oper_name"].ToString();
                this.lblSendTime.Text = row["send_time"].ToString();
                this.lblContent.Text = row["note"].ToString();
                string file = row["filename"].ToString();
                if (!string.IsNullOrEmpty(file))
                {
                    this.linkFiles.Text = file;
                    this.linkFiles.NavigateUrl = "~/gs_files/" + file;
                }
                else
                {
                    this.linkFiles.Text = "无";
                }
            }
            InfoChecker ic = new InfoChecker();
            ic.SetInfoReaded(gsid, InfoCheckType.Gs);
        }
    }
}
